package com.funong.matrix.biz.base.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.funong.matrix.core.base.FunongBaseEntity;
import com.funong.matrix.core.enums.IsDeletedEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author wanjialin
 * @version 1.0
 * @date 2023/5/18
 */

@Data
@TableName("sys_user")
@ApiModel("用户")
@Accessors(chain = true)
public class SysUserEntity extends FunongBaseEntity {

    @ApiModelProperty(value = "用户账号")
    private String account;

    @ApiModelProperty(value = "用户名称")
    private String name;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "状态")
    private Integer status;

    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value = "性别")
    private Integer sex;

    @ApiModelProperty(value = "头像地址")
    private String avatar;

    @ApiModelProperty(value = "工号")
    private String workOn;

    @ApiModelProperty(value = "姓名")
    private String nickName;

    @ApiModelProperty(value = "系统ID")
    private Integer systemId;

    @ApiModelProperty(value = "部门code")
    private String deptCode;

    @ApiModelProperty(value = "公司code")
    private String companyCode;

    @ApiModelProperty(value = "初始公司code")
    private String initialCompanyCode;

    @ApiModelProperty(value = "是否是第一次登录(（0 否 1是）)")
    private String firstLogin;

    @ApiModelProperty(value = "所属客户ID")
    private Integer customerId;

    @ApiModelProperty(value = "所属客户管理员")
    private Integer customerAdmin;

    public static final LambdaQueryWrapper<SysUserEntity> gw() {
        return new LambdaQueryWrapper<SysUserEntity>().eq(FunongBaseEntity::getIsDeleted, IsDeletedEnum.NOT_DELETED.getValue());
    }
}
